package cn.t.repository.user;

import cn.t.core.repoistory.impl.IRepository;
import cn.t.model.user.ParticipantRoleDO;

import java.util.List;

/**
 * 参与者和角色关联表领域仓库
 * @author l
 */
public interface ParticipantRoleRepository extends IRepository<ParticipantRoleDO> {

    boolean deleteByParticipantId(Long participantId);
     Boolean deleteParticipantRoleByRoleId(Long roleId,Long firmId);

    List<ParticipantRoleDO> findMenuByParticipantId(Long participantId);

    List<ParticipantRoleDO> findMetalIssueByParticipantId(Long participantId);
    List<String> findEmailAddressByParticipantId(Long participantId, Long firmId);

    Boolean deleteByRoleId(Long roleId);

    Boolean removeByParticipantId(Long participantId);

    void disableRoleByUserId(Long userId);

    void enableRoleByUserId(Long userId);

    List<ParticipantRoleDO> findMetalReplenishByParticipantId(Long participantId);

    List<ParticipantRoleDO> findAllByParticipantIdIgnoreDisable(Long participantId);

    List<ParticipantRoleDO> findAllByParticipantId(Long participantId);
}
